package com.cjet.nissan.base

import androidx.multidex.MultiDexApplication
import com.cjet.nissan.room.AppDatabase
import com.cjet.nissan.room.NTDS
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlin.reflect.KParameter

class App : MultiDexApplication() {
    override fun onCreate() {
        super.onCreate()

        AppDatabase.getInstance(this)
        GlobalScope.launch(Dispatchers.IO) {
            AppDatabase.getInstance(this@App)?.appDatabaseDao?.insert(NTDS())
        }
    }
}
